/*
 * easysmtp - A simple C lib in Linux to help you send mails in an easy way
 * Copyright (C) 2012-2013, easysmtp developers and contributors
 *
 * easysmtp is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * easysmtp is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with easysmtp; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef _ERROR_H_
#define _ERROR_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#include "easysmtp.h"

/*
 * 枚举定义错误码的值
 */
enum smtp_error {
	SETERROR = 1, SSUNAVAILABLE, SMBOXUNAVAILABLE,
	SLOCALERROR, SNOSTORAGE, SCMDERROR,
	SPARAERROR, SCNOIMPLEMENT, SBADCOMMANDS,
	SPNOIMPLEMENT, SNOTAKEN, SUSERNOTLOCAL,
	SEXCEEDED, SMBOXNOTALLOWED, STRANSFAILED,
	SAUTHFAILED, SMTPERROR
};
extern int serrno;

extern void psys_error();
extern void psmtp_error();
extern void pssl_error();

#endif
